<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/mytable/mytable/Fk_flow.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/mytable/mytable/Fk_flow.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'fk_flow_id',
                footer: "Foots",
                cnName: '业务流程定义',
                name: 'mytable/Fk_flow',
                url: "/Fk_flow/",
                sortName: "pxm"
            });
            const editFormFields = ref({"racct":"","rcntr":"","stepid":"","tj_je":"","nextstepid":"","pxm":"","roleid":[],"tjsql":"","remark":"","node_attr":""});
            const editFormOptions = ref([[{"dataKey":"fei_typelist","data":[],"title":"科目","field":"racct","disabled":true,"type":"select"},
                               {"dataKey":"cntr","data":[],"title":"成本中心/研发项目","field":"rcntr","disabled":true,"type":"select"},
                               {"dataKey":"steplist","data":[],"title":"当前步骤","field":"stepid","type":"select"},
                               {"title":"金额(>=)","field":"tj_je","type":"decimal"}],
                              [{"dataKey":"steplist","data":[],"title":"下一步骤","field":"nextstepid","type":"select"},
                               {"title":"排序码","field":"pxm","type":"number"}],
                              [{"dataKey":"tree_roles","data":[],"title":"当前处理角色","field":"roleid","type":"cascader"},
                               {"title":"条件SQL","field":"tjsql","colSize":12,"type":"textarea"}],
                              [{"title":"说明","field":"remark","colSize":12,"type":"textarea"}],
                              [{"title":"流程属性","field":"node_attr"}]]);
            const searchFormFields = ref({"racct":"","rcntr":"","stepid":"","nextstepid":"","bek":"","roleid":[],"tjsql":"","pxm":[null,null],"remark":"","node_attr":""});
            const searchFormOptions = ref([[{"dataKey":"tree_roles","data":[],"title":"next处理角色","field":"nextroleid","type":"select"}],[{"dataKey":"fei_typelist","data":[],"title":"科目","field":"racct","type":"select"},{"dataKey":"cntr","data":[],"title":"成本中心/研发项目","field":"rcntr","type":"select"},{"dataKey":"steplist","data":[],"title":"当前步骤","field":"stepid","type":"select"},{"dataKey":"steplist","data":[],"title":"下一步骤","field":"nextstepid","type":"select"},{"dataKey":"flow_b_e","data":[],"title":"流程起始标识","field":"bek","type":"select"},{"dataKey":"tree_roles","data":[],"title":"当前处理角色","field":"roleid","type":"cascader"},{"title":"条件SQL","field":"tjsql"},{"title":"排序码","field":"pxm","type":"range"},{"title":"说明","field":"remark"},{"title":"流程属性","field":"node_attr","type":"text"}]]);
            const columns = ref([{field:'fk_flow_id',title:'fk_flow_id',type:'guid',width:110,hidden:true,require:true,align:'left'},
                       {field:'racct',title:'科目',type:'string',bind:{ key:'fei_typelist',data:[]},width:110,hidden:true,readonly:true,align:'left'},
                       {field:'rcntr',title:'成本中心/研发项目',type:'string',bind:{ key:'cntr',data:[]},width:110,hidden:true,readonly:true,align:'left'},
                       {field:'stepid',title:'当前步骤',type:'int',bind:{ key:'steplist',data:[]},width:110,align:'left',sort:true},
                       {field:'nextstepid',title:'下一步骤',type:'int',bind:{ key:'steplist',data:[]},width:110,align:'left'},
                       {field:'bek',title:'流程起始标识',type:'int',bind:{ key:'flow_b_e',data:[]},width:110,align:'left'},
                       {field:'roleid',title:'当前处理角色',type:'int',bind:{ key:'tree_roles',data:[]},width:80,align:'left'},
                       {field:'tj_je',title:'金额(>=)',type:'decimal',width:110,align:'left'},
                       {field:'tjsql',title:'条件SQL',type:'string',width:320,align:'left'},
                       {field:'pxm',title:'排序码',type:'int',sort:true,width:60,align:'left'},
                       {field:'remark',title:'说明',type:'string',width:100,align:'left'},
                       {field:'node_attr',title:'流程属性',type:'string',width:110,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
